import request from '@/utils/request'

// 获取订单列表
export const getOrderList = (params) => {
  return request.get('/order/list', { params })
}

// 获取订单详情
export const getOrderDetail = (id) => {
  return request.get(`/order/detail`, { params: { id } })
}

// 修改订单
export const editOrder = (data) => {
  return request.post('/order/edit', data)
}

// 获取订单统计数据
export const getOrderTotal = (params) => {
  const requestParams = {
    date: params.date 
  };
  return request.get('/order/ordertotal', { params: requestParams })
}